﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WebDownload
{
    public partial class FormWizard : Form
    {
        public string ConfigPath = "";
        public FormWizard()
        {
            InitializeComponent();
        }

        private void buttonOpen_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "config files(*.conf)|*.conf|All files(*.*)|*.*";
            var res = ofd.ShowDialog();
            if (DialogResult.OK == res)
            {
                ConfigPath = ofd.FileName;
            }
            this.DialogResult = res;
        }

        private void buttonNew_Click(object sender, EventArgs e)
        {
            FormConfigEdit wiz = new FormConfigEdit();
            var res = wiz.ShowDialog();
            if (DialogResult.OK == res)
            {
                ConfigPath = wiz.savepath;
            }
            this.DialogResult = res;
        }
    }
}
